#!/bin/bash


function rsync_status() {

	if test "$1" = "0";  then RSYNCMSG="SUCCESS"; fi
        if test "$1" = "1";  then RSYNCMSG="ERROR: Syntax or usage error"; fi
        if test "$1" = "2";  then RSYNCMSG="ERROR: Protocol incompatibility"; fi
        if test "$1" = "3";  then RSYNCMSG="ERROR: Errors selecting input/output files, dirs"; fi
        if test "$1" = "4";  then RSYNCMSG="ERROR: Requested  action not supported: an attempt was made to manipulate 64-bit files on a platform that cannot support them; or an option was specified that is supported by the client and not by the server."; fi
        if test "$1" = "5";  then RSYNCMSG="ERROR: Error starting client-server protocol"; fi
        if test "$1" = "6";  then RSYNCMSG="ERROR: Daemon unable to append to log-file"; fi
        if test "$1" = "10"; then RSYNCMSG="ERROR: Error in socket I/O"; fi
        if test "$1" = "11"; then RSYNCMSG="ERROR: Error in file I/O"; fi
        if test "$1" = "12"; then RSYNCMSG="ERROR: Error in rsync protocol data stream"; fi
        if test "$1" = "13"; then RSYNCMSG="ERROR: Errors with program diagnostics"; fi
        if test "$1" = "14"; then RSYNCMSG="ERROR: Error in IPC code"; fi
        if test "$1" = "20"; then RSYNCMSG="ERROR: Received SIGUSR1 or SIGINT"; fi
        if test "$1" = "21"; then RSYNCMSG="ERROR: Some error returned by waitpid()"; fi
        if test "$1" = "22"; then RSYNCMSG="ERROR: Error allocating core memory buffers"; fi
        if test "$1" = "23"; then RSYNCMSG="ERROR: Partial transfer due to error"; fi
        if test "$1" = "24"; then RSYNCMSG="WARNING: Partial transfer due to vanished source files"; fi
        if test "$1" = "25"; then RSYNCMSG="ERROR: The --max-delete limit stopped deletions"; fi
        if test "$1" = "30"; then RSYNCMSG="ERROR: Timeout in data send/receive"; fi
        if test "$1" = "35"; then RSYNCMSG="ERROR: Timeout waiting for daemon connection"; fi

}

# eof
